<?php

 include_once("../model/dbConfig.php");
 include_once("functions.php");
 include_once("Classes/logging.php");

     global $config;
		

    //mysql_connect('localhost',$username,$password);
	$link =mysql_connect($config['host_address'],$config['username'],$config['password']);
    if (!$link) {
    die('Not connected : username:' .$username. mysql_error());
    }
   mysql_query("set characher set utf8");
      mysql_query("set names utf8");	
		$db_selected = mysql_select_db($config['database'], $link);
    if (!$db_selected)
        {
         die ("Can\'t use menu_item : " . mysql_error());
        }
		if(!isset($_REQUEST['action'])){
			return "no such action<br>";
		}else{
			$action=$_REQUEST['action'];
		include_once("$action.php");
			
		}
		
		
		/*
		elseif($_REQUEST['action']=="checklogin"){
			 include_once("checklogin.php");
			
		}elseif($_REQUEST['action']=="logout"){
			 include_once("logout.php");
			
		}elseif($_REQUEST['action']=="modify_current_account"){
			 include_once("modify_current_account.php");
			
		}elseif($_REQUEST['action']=="add_organization"){
			 include_once("add_organization.php");
			
		}elseif($_REQUEST['action']=="delete_organization"){
			 include_once("delete_organization.php");
			
		}elseif($_REQUEST['action']=="alter_organization"){
			 include_once("alter_organization.php");
			
		}elseif($_REQUEST['action']=="add_user"){
			 include_once("add_user.php");
			
		}elseif($_REQUEST['action']=="delete_user"){
			 include_once("delete_user.php");
			
		}elseif($_REQUEST['action']=="alter_user"){
			 include_once("alter_user.php");
			 
		}elseif($_REQUEST['action']=="organization_stack"){
			 include_once("organization_stack.php");
			 
		}elseif($_REQUEST['action']=="add_item"){
			 include_once("add_item.php");
			 
		}elseif($_REQUEST['action']=="organization_distribute"){
			 include_once("organization_distribute.php");
			 
		}elseif($_REQUEST['action']=="organization_distribute_confirm"){
			 include_once("organization_distribute_confirm.php");
			 
		}*/
		

?>